<extend name="Public/base"/>
<block name="sidebar">
    <include file="sidemenu"/>
</block>
<block name="body">
    <div class="main-title">
        <h2>{$order['name']}---订单详情</h2>
    </div>
    <input type="text" hidden readonly name="bid" value="{$bid}">
    <div class="">
        <div class="">
            <a class="btn" href="{:U('Order/add_root',array('pid'=>0,'bid'=>$bid))}">新增分类</a>
            <a class="btn" style="background-color: #0e90d2" href="{:U('Order/show',array('id'=>$bid))}">订单预览</a>
        </div>
    </div>
    <div class="tab-wrap">
        <div class="tab-content">
            <div class="tab-pane in">
                <!--第一层节点-->
                <volist name="roots" id="first">
                    <dl class="checkmod">
                        <dt class="hd">
                            <label>{$first['name']}</label>
                            <a class=""
                               href="{:U('Order/edit_root',array('id'=>$first['id']))}">[@]</a>
                            <empty name="first['type']">
                                <a href="{:U('Order/add_root',array('pid'=>$first['id'],'bid'=>$bid))}">[+]</a>
                            </empty>
                            <a class="confirm ajax-get"
                               href="{:U('Order/delete_root',array('id'=>$first['id'],'bid'=>$bid))}">[-]</a>
                        </dt>
                        <dd class="bd">
                            <notempty name="first['child']">
                                <!--第二层节点-->
                                <volist name="first['child']" id="second">
                                    <div>
                                        <span class="divsion"></span>
                                        <label class="">{$second['name']}</label>
                                        <a class=""
                                           href="{:U('Order/edit_root',array('id'=>$second['id']))}">[@]</a>
                                        <empty name="second['type']">
                                            <a href="{:U('Order/add_root',array('pid'=>$second['id'],'bid'=>$bid))}">[+]</a>
                                        </empty>
                                        <a class="confirm ajax-get"
                                           href="{:U('Order/delete_root',array('id'=>$second['id'],'bid'=>$bid))}">[-]</a>
                                    </div>
                                    <notempty name="second['child']">
                                        <span class="divsion"></span>
                                        <span class="divsion"></span>
                                        <!--第三层节点-->
                                        <span class="child_row">
                                        <foreach name="second['child']" item="third">
                                            <label class="checkbox">{$third['name']}
                                                <a class=""
                                                   href="{:U('Order/edit_root',array('id'=>$third['id']))}">[@]</a>
                                                <a class="confirm ajax-get"
                                                   href="{:U('Order/delete_root',array('id'=>$third['id'],'bid'=>$bid))}">[-]</a>
                                            </label>
                                        </foreach>
                                        </span>
                                    </notempty>
                                </volist>
                            </notempty>
                        </dd>
                    </dl>
                </volist>
            </div>
        </div>
    </div>
    <div>
        <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
    </div>
</block>
